{{!
  Copyright IBM Corp. 2016, 2025
  SPDX-License-Identifier: BUSL-1.1
}}
<Hds::Card::Container
  @level="mid"
  @hasBorder={{true}}
  class="has-padding-m has-top-bottom-margin-12"
  data-test-card-container="metadata"
  ...attributes
>
  <Hds::Text::Display @size="300" @tag="h2" class="has-bottom-margin-s hds-foreground-strong">Metadata</Hds::Text::Display>

  <div class="flex gap-16 is-flex-column has-top-padding-s">
    <Hds::Form::Fieldset @layout="vertical" as |F|>
      <F.Legend>Path</F.Legend>
      <F.HelperText>The mount path where this secrets engine is accessible.</F.HelperText>
      <F.Control>
        <Hds::Layout::Flex @gap="8">
          <Hds::Copy::Snippet @textToCopy={{@model.secretsEngine.path}} @color="secondary" data-test-copy-snippet="path" />
        </Hds::Layout::Flex>
      </F.Control>
    </Hds::Form::Fieldset>

    <Hds::Form::Fieldset @layout="vertical" as |F|>
      <F.Legend>Accessor</F.Legend>
      <F.HelperText>Internal identifier used by Vault to reference this engine.</F.HelperText>
      <F.Control>
        <Hds::Layout::Flex @gap="8">
          <Hds::Copy::Snippet
            @textToCopy={{@model.secretsEngine.accessor}}
            @color="secondary"
            data-test-copy-snippet="accessor"
          />
        </Hds::Layout::Flex>
      </F.Control>
    </Hds::Form::Fieldset>
    <Hds::Form::Textarea::Field
      name="description"
      @value={{@model.secretsEngine.description}}
      @isInvalid={{(gt @model.secretsEngine.description.length 500)}}
      as |F|
    >
      <F.Label>Description</F.Label>
      <F.HelperText>A short description of the secrets engine's purpose.</F.HelperText>
      <F.CharacterCount @maxLength={{500}} />
      {{#if (gt @model.secretsEngine.description.length 500)}}
        <F.Error>Description exceeds character limit.</F.Error>
      {{/if}}
    </Hds::Form::Textarea::Field>
  </div>
</Hds::Card::Container>